package fr.neyb.bernouilli.problem018;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Path {

	private List<Node> content = new ArrayList<>();

	public Path(Node... n) {
		content.addAll(Arrays.asList(n));
	}

	public Path(Path begin, Path end) {
		content.addAll(begin.content);
		content.addAll(end.content);
	}

	public int getWeigth() {
		int res = 0;
		for (Node n : content) {
			res += n.getValue();
		}
		return res;
	}

}
